<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html class="win-frame">
<head>
 <title>${name_china}管理-查看${name_china}</title>
 <%@include file="/common/head.jsp" %>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/plugin/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/plugin/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/plugin/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/image-server/style/style.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/static/plugin/webuploader-0.1.5/webuploader.css">
<link href="<%=request.getContextPath()%>/static/plugin/webuploader-0.1.5/uploader.css" rel="stylesheet">
<!-- <script type="text/javascript" src="<%=request.getContextPath()%>/static/plugin/jquery-3.2.1.min.js"></script> -->
<script type="text/javascript" src="<%=request.getContextPath()%>/static/plugin/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/static/plugin/webuploader-0.1.5/webuploader.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/static/plugin/webuploader-0.1.5/common.js"></script>


</head>
<body class="iframe-page">
<div class="page-title-wrapper">
    <div class="page-title">
        <div class="page-title-text">
            <span>${name_china}管理</span>
            <span class="split"></span>
            <span>${name_china}详情</span>
        </div>
        <a id="goBack" class="btn-return distance-left" href="javascript:;" onclick="parent.refreshList('${org.code}');"><i class="icon icon-arrow-left"></i>返回上级</a>
    </div>
    <div class="page-title-border"></div>
</div>

<form id="form">
<div class="left-wrap">
   <h3>订单基本信息</h3>
    <table class="table-view">
        <tr>
	       <td class="td-title">用户昵称</td>
	       <td><span name="userName"></span></td>
        </tr>
         <tr>
	       <td class="td-title">用户头像</td>
	       <td id="userHeadImg"></td>
        </tr>
         <tr>
	       <td class="td-title">提现类型</td>
	       <td><span name="type"></span></td>
        </tr>
         <tr>
	       <td class="td-title">提现金额</td>
	       <td><span name="money"></span></td>
        </tr>
         <tr>
	       <td class="td-title">提现账号名称</td>
	       <td><span name="zfbName"></span></td>
        </tr>
        <tr>
	       <td class="td-title">提现账号</td>
	       <td><span name="zfbAccount"></span></td>
        </tr>
         <tr>
	       <td class="td-title">真实名称</td>
	       <td><span name="actureName"></span></td>
        </tr>
        <tr>
	       <td class="td-title">备注</td>
	       <td><span name="note"></span></td>
        </tr>
    </table>
    	
          <div class="form-cont">
	        <p class="form-cont-title">载图</p>
	        <input type="hidden" id="image" name="image"/>
	       <!--  <input type="text" id="detailImageUrls" name="detailImageUrls" class="summer-input summer-validatebox"  data-validatebox="validType:['required','maxLength[1000]']"/> --> 
	       <!-- 文件上传 -->
	     	<div >
				<div id="imageList" class="uploader-list"></div>
				<div id="imagePicker">选择图片</div>
				
			</div>
	     </div>
	     
         <div class="form-cont">
	        <p class="form-cont-title">备注</p>
	        <textarea class="summer-textarea" id="note" name="note"></textarea>
	     </div>
      <div class="form-btn-wrapper" id="funcbar">
        <a class="btn btn-normal" id="backBtn">关闭</a>
    </div>
</div>  
<input type="hidden" id="id" name="id"/> 
</form>
<script>
var   viewData,
      permission = CommonUtil.getPermission('${name_english}');
      
   $(function(){
	   filePlugin("#image","#imagePicker","#imageList");
	   
	    //初始化funcbar
    	$('#funcbar').prepend($.funcbar({
           type: 'button',
           data: permission,
           permit: ['${name_english}:fafang','${name_english}:falsess']
        }));
	 
	   viewData = ${viewEdit};
	   
	   $("#form").form().form("loadDataView",{
	   		  data : viewData
	   }); 
	   $('#userHeadImg').append("<img src='"+viewData.userHeadImg+"' style='weight:100px;height:100px;'></img>");
	   $("#id").val(viewData.id);
	   
	   $('#backBtn').on('click', backHome);
	   
		//保存按钮
      	$('#funcbar').on('click', 'a[data-permit="${name_english}:fafang"]', submit);
        //保存按钮
      	$('#funcbar').on('click', 'a[data-permit="${name_english}:falsess"]', submitFalse);
   });
   
   //表单提交
   function submit() {
	   $("#form").form({
	       	 buttons : ['#saveBtn'],
	            ajax: {
	                url: CONST_URL.FAFANG
	            },
	            onSubmitSuccess: function (data) {
	           	 $.stip({
	  	                type:'ok',//显示类型 有info、 ok、 danger
	  	                text: '发放成功！',
	  	                onBeforeHide: function () {
	  	                	//backHome();
	  	                }
	           	 });
	             }
	        }).form("submit"); 
   }
   
 //表单提交
   function submitFalse() {
	   $("#form").form({
	       	 buttons : ['#saveBtn'],
	            ajax: {
	                url: CONST_URL.FALSESS
	            },
	            onSubmitSuccess: function (data) {
	           	 $.stip({
	  	                type:'ok',//显示类型 有info、 ok、 danger
	  	                text: '发放失败！',
	  	                onBeforeHide: function () {
	  	                	backHome();
	  	                }
	           	 });
	             }
	        }).form("submit");
       
   }
   
   function backHome() {
      window.location.href =  basePath + "${common_url}init";
   }
   
 //请求url
   var CONST_URL = {
		 FALSESS: basePath + "${common_url}falsess",
		 FAFANG: basePath + "${common_url}fafang"
   };
   
</script>
</body>
</html>